// compentents/selectgrade/selectgrade.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    gradeInfo:[
      {
        academic:"小学",
        grade:["一年级","二年级","三年级","四年级","五年级","六年级"]
      },
      {
        academic:"初中",
        grade:["初一","初二","初三"]
      },
      {
        academic:"高中",
        grade:["高一","高二","高三"]
      }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    // 选择年级向父组件传参
    selgrade(e){
     const {grade} = e.target.dataset
    //  this.triggerEvent()
     this.triggerEvent('changeGrade',{grade},{})
    }
  }
})
